Add Book to My BookshelfPurchase This Book Online

Chapter 5 - Introduction to IP Routing Protocols

Cisco & IP Addressing
Louis D. Rossi, Louis R. Rossi and Thomas Rossi
  Copyright © 1999 The McGraw-Hill Companies, Inc.

Chapter 5: Introduction to IP Routing Protocols
Overview
A router has two main functions:
  Path determination
  Switching packets to the appropriate interface.
Path determination is a process in which the router “learns” of the different paths to each possible destination in the topology, picks the best path, based upon some criteria, and then places that information in a table.
Once this table is complete the router is able to take data packets from the incoming interface, examine the destination address and, based on the information contained in the table, “switch” the packet to the appropriate outgoing interface.
What Is a Routing Protocol?
This is the language that routers use to talk to each other. The purpose of this communication is to allow routers to “see” the network topology so that a best path can be selected. We might use the analogy: if cities could talk to each other to inform neighboring cities what roads they are connected to, a map could be created.
When routers communicate to each other a “map” is being created that will allow each router to discover the best path to each destination network.
There are two basic types of routing protocols, Distance Vector (DV) and Link State.
Why is a distance-vector protocol called a distance-vector protocol?
When routers communicate using a DV protocol, this communication includes information concerning distance and direction (vector).
Distance can be measured in a variety of ways; IP RIP uses hops to measure distance and IPX RIP uses tick ([1/18]th of a second) and hop count.
Refer to Figure 5.1. Assuming Router_A was running a DV protocol, Router_A would communicate information about its Ethernet link to Router_B.  Router_B would receive this information and know that Router_A’s Ethernet network is 1 hop away (distance) and it should use its Serial 0 interface (vector) to get there.
Why is a link-state protocol called a link-state protocol?
When routers talk to other routers they communicate the status (state) of their links to their neighbors.
If a link-state protocol were running in Figure 5.1, Router_A would test the directly connected Ethernet link and then communicate that information to the other routers if, and only if, the state had changed from the previous test. The only exception to this would be if the router had just been powered on; it would then “flood” information about its links to all other routers. The main point here is: if no change has taken place in the state of the link from the previous test, no communication will take place.
OSPF is an example of a link-state protocol. We will discuss this more in a later chapter.
A link-state protocol does not communicate distances, but there is a cost associated with each link. For example, when OSPF is running on a Cisco router, each link would have a default cost of 108 divided by the bandwidth of the link.
For example, a 10 Mbps Ethernet link would have a default cost of 10 (108/107). The total cost to get to a network would be the sum cost of each individual network.
What Are the Basic Differences Between Distance-Vector and Link-State Routing Protocols?
To help understand the difference between DV and link state, I ask students to answer the following three questions:
  What does the routing protocol communicate?
  When does the routing protocol communicate?
  To whom does the routing protocol communicate?
Distance Vector
A distance-vector protocol communicates the entire routing table (with some exceptions that we do not have to worry about in this discussion).
A distance-vector protocol communicates periodically. For example IP RIP communicates every 30 seconds, while IPX RIP communicates every 60 seconds.
A distance-vector protocol communicates to directly connected neighbors.
Figure 5.1  4 Router Topology
If in Figure 5.1 the DV protocol of IP RIP were running on all routers, the following would be true:
  Router_A would send its routing table to Router_B every 30 seconds. Router_A would not communicate to any other router.
  Router_C would send its routing table to Router_B every 30 seconds. Router_C would not communicate to any other router.
  In fact all routers other than Router_B would only communicate to Router_B. They would never send IP RIP packets to each other.
  Router_B would send its routing table to all other routers periodically (every 30 seconds).
Because routers running a DV protocol only communicate to directly connected routers the process has sometimes been referred to as rumor routing.
In our topology Router_A has no direct communication with Router_D. Router_A only knows through “rumor” that there is an Ethernet network out there someplace that is 2 hops away.
Router_A does not know that there is a router named Router_D, Router_A knows only of hops.
Distance-vector protocols have some habits that cause additional processing and traffic. Consider, if you will, that all networks are up and running and everything is fine in Camelot.
All routers would still send their routing tables periodically, in this case every 30 seconds, to their directly connected neighbors.
Why is it necessary for these routers to burn up bandwidth and processing time to look at information that has not changed?
This is like your mother calling you up every night and going through your entire family tree to tell you everyone is alive and no one died since yesterday.
Let’s make a policy, a protocol we might say; Mom will call only when someone dies. If we don’t hear from Mom we will assume everyone is still alive and well.
If Mom agrees to our proposal, we are using a link-state protocol.
Link State
Link state communicates just the state of the link to all neighbors when the state of the link changes; this makes it a much more efficient protocol.
Referring to Figure 5.1, Router_A can communicate with all other routers. Router_A will know the identification (ID) of all other routers. There are no more rumors, because Router_A received communication from Router_D about Router_D’s directly connected links.
Further more Router_A will know the exact path taken to get to Router_D. Router_A knows that a packet must go through Router_B to get to Router_D.
There is one problem with the mother analogy: if we tell Mom to call only when someone dies what happens if Mom dies?
As a result a link-state protocol will use a “hello protocol” periodically to let neighbors know that it is still alive.
In other words, we will tell Mom to call us every night just to say “hello” and hang up; as a result we will know that no one in our family has died and Mom is alive.
What Is a Hybrid Routing Protocol?
EIGRP is an example of a hybrid routing protocol because it shares attributes of both distance-vector and link-state routing protocols.
EIGRP communicates the routing table with directly connected neighbors, but only when a change occurs.
What Is Metric?
Metric is the criteria used by a routing protocol to determine which is the best path to a destination.
Earlier in this chapter we stated that IP RIP uses hop count to measure distances. Put in another way, IP RIP uses hop count as its metric.
As an analogy, my friend Rudy was in Tampa last year and wanted to come to Tallahassee to visit me. He asked the best route to take. Since he was also a Cisco instructor I asked him what his metric was.
In other words, was Rudy interested in how fast he could get to Tallahassee or was he more interested in taking his time and enjoying the scenery?
His metric might influence his route choices.
It works much the same way for routers, depending on the metric used by the routing protocol. Since IP RIP uses hop count as its metric, a router has no way to distinguish between a T1 link and a 56K link. As a result, if there are multiple ways to get to a destination network with the same hop count, a router may choose the 56K link, not exactly the way you would like your packets to travel.
To illustrate this point let us change our topology slightly.
Notice we have an additional Ethernet link between Router_A and Router_C and the serial links to Router_A and Router_C have been identified as T1 and 56K links respectively.
If Router_B receives a packet destined for Host E, Router_B has two ways to send the packet. It could use the Serial 0 or the Serial 1 interface.
Figure 5.2  Router Topology with Multip le Ways to the Destination
Which one will it use? Or will it use both?
That depends upon the metric being used. If we assume RIP is running, the hop count is the same for either of the two ways. IP RIP has no way to distinguish the difference in bandwidth of the two links. RIP will pick one of those ways. If these routers are Cisco routers Router_B will load balance and use both ways to get to network 10.10.10.16.
What is a routing table?
As routes or paths are learned, the “best paths” will be placed in a routing table. The routing table will contain a list of networks associated with an interface that represents the best path to each of the networks.
What is the best path?
Each router, based on the metric for a particular routing protocol, discovers the best path to a destination network. The best path to a destination is the one with the lowest metric. These routes are then placed in the routing table. Routers also receive information concerning paths that are not the best; these routes are not entered into the routing table.
I have set the Figure 5.2 topology up in the LAB so I can show you the routing table of Router_B. Refer to Figure 5.3.
Router_B#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
    D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
    N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
    E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
    i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default
    U - per-user static route, o - ODR
Gateway of last resort is not set
    10.0.0.0/28 is subnetted, 4 subnets
R    10.10.10.16 [120/1] via 10.10.10.34, 00:00:22, Serial0
       [120/1] via 10.10.10.66, 00:00:15, Serial1
C    10.10.10.32 is directly connected, Serial0
C    10.10.10.64 is directly connected, Serial1
C    10.10.10.96 is directly connected, Serial2
Figure 5.3  IP RIP Routing Table of Router_B
Table 5.1  IP Protocols and Administrative Distances (AD)
Protocol
AD
EIGRP
90
IGRP
100
OSPF
110
RIP
120
BGP
180
The bolded lines show that Router_B has two ways to get to network 10.10.10.16. Router_B will use both Serial 0 and Serial 1. The metric in each case is 1 hop.
Now we will throw a new wrinkle into the mix. Suppose we used IGRP as the routing protocol? (We will discuss IGRP in more detail later.)
How does IGRP differ from IP RIP?
IGRP uses a composite metric of bandwidth, delay, load, reliability and MTU.
It has the ability to “realize” that the Serial 0 connection is the better path to network 10.10.16.0.
Assuming all Cisco defaults, Router_B will always take the Serial 0 link as the routing table shows in Figure 5.4.
Router_B#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
  D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
  N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
  E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
  i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default
  U - per-user static route, o - ODR
Gateway of last resort is not set
  10.0.0.0/28 is subnetted, 4 subnets
I    10.10.10.16 [100/8576] via 10.10.10.34, 00:00:04, Serial0
C    10.10.10.32 is directly connected, Serial0
C    10.10.10.64 is directly connected, Serial1
C    10.10.10.96 is directly connected, Serial2
Figure 5.4  IGRP Routing Table of Router_B
Clearly the bolded line shows only one path will be used by Router_B to get to network 10.10.10.16. The path using the Serial 1 interface has a higher metric and therefore is not used.
What Is the Meaning of Administrative Distance?
This is a Cisco term which deals with the reliability of the information that routers receive.
If a router receives two updates concerning a specific network and each of these updates comes from two different routing protocols, which routing update should the router use to determine the best path?
Cisco uses administrative distance to solve this dilemma. Each routing protocol carries an administrative distance value. The lower the value, the higher the reliability of the protocol.
Table 5.1 indicates that the EIGRP routing protocol is considered the most reliable.
If IGRP and RIP were running on all routers in Figure 5.1, the routing table would indicate that IGRP information would be used to get to all destinations.
What Does Convergence Mean?
Keep in mind that a routing protocol is the communication among routers for the purpose of discovering the network topology and determining the best path.
When all routers agree on what the network topology is, convergence has been achieved. When there is no convergence, data packets will be unable to reach their destination. The time it takes to converge is an important element of a routing protocol. Link-state routing protocols typically converge faster than distance-vector protocols.
What Is Load Sharing?
Load sharing is when equal or unequal cost routes exist to a single destination network, and the traffic to that network is proportionally distributed across the multiple routes.
Cisco’s IGRP is an example of a routing protocol that can perform load sharing. Assume that two routes exist to Network A; one of these routes goes over a 512K link and the other route goes over a T1 link. IGRP can be configured with a variance of 2 so that for every packet that goes the 512K route two packets will travel the T1 route.
Figure 5.5 illustrates a load-sharing scenario. Notice that the metric is not the same but both routes are placed in the routing table.
Gateway of last resort is not set
  10.0.0.0/28 is subnetted, 4 subnets
I    10.10.10.16 [100/8576] via 10.10.10.34, 00:00:07, Serial0
        [100/180671] via 10.10.10.66, 00:00:07, Serial1
C    10.10.10.32 is directly connected, Serial0
C    10.10.10.64 is directly connected, Serial1
C    10.10.10.96 is directly connected, Serial2
Figure 5.5  IGRP Configured with Variance
The metric for the Serial 0 route is 8576 while the metric for the Serial 1 route is 180671. Do not worry about where these numbers come from; at this point it is not important. Just remember the lower the number the better the route.
What Is the Difference Between an Interior Gateway Protocol and an Exterior Gateway Protocol?
An IGP communicates within a defined region referred to as an Autonomous System (AS).
An EGP communicates between different autonomous systems.
An AS is defined as a group of routers under common administration. We will cover that topic in a later chapter.
In this book we will configure only the IGP routing protocols of IP RIP, IGRP, EIGRP, and OSPF.
What Is a Static Route?
A dynamic route is a route discovered by the router using a routing protocol. Assume there is only one way to a destination or you want the router to send data packets in a certain direction. You may not want a router to spend all the processing time and bandwidth required just to discover that there is only way to that destination. You may just want to point the router to the appropriate interface for certain destinations; this is called a static route.
For years I would travel to strange cities doing Novell and Cisco classes. If I wanted to visit some point of interest I could use a map and spend my time finding my current location and finding my destination, then mapping out a route to that destination. Or if I was lucky a student in the class might know exactly the best way to get to that destination and give me specific directions (static route).
Using a static route does present the administrator with the additional task of keeping all of the static routes current.
Also we may have an additional problem. Go back to my analogy for a minute; suppose I write out the directions to my destination and I start on my trip only to discover that a road is blocked. Since I only have the directions and not the map I do not have the ability to “discover” an alternate route.
This will also be true of the router. Since the router has a static route configured it will not have the ability to discover another path.  If there is only one way to the destination it does not make any difference, but static routes can be used any time, not only for one-way destinations.
Suppose a router discovers a route to the same destination for which there is a static route configured?
Static routes will carry an administrative distance of 0 or 1. As we learned earlier the lower the administrative distance the more the reliable the route. The router will always put the static route in its routing table. It is possible to raise the administrative distance of a static route. In such a case we would be using the static route as a backup route or a “floating static route” because if the original path should be lost the static route will float to the top.
What Is a Default Route?
In this scenario assume a packet arrives at the router, the router reads the destination IP address, then goes to the routing table to determine the interface to which the packet should be sent, but the destination is not listed in the routing table.
If no destination exists in the routing table the router will drop the packet, unless a default route is configured.
In this case we are telling the router that if we do not know where to send a packet, always send it to a particular interface.
Think of your organization using the Internet. Do you want your router to have all the different networks of the Internet in the routing table? You do not; so we configure a default route which points to our ISP.
Figure 5.6 is a summary outline of several routing protocols.
I Interior Gateway Routing Protocols (IGP)
 A. Distance Vector
  1. IP RIP
  2. Cisco’s IGRP
  3. IPX RIP (Novell)
  4. Applecommunicate RTMP
 B. Link State
  1. OSPF
  2. NLSP (Novell)
 C. Hybrid
  1. Cisco’s EIGRP
  2. IS_IS
II Exterior Gateway Routing Protocols (EGP)
  1. BGP4
Figure 5.6 Routing Protocol Outline

 


 
Books24x7.com, Inc © 2000 –  Feedback